home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 3
/
003.d81
/
tables & people
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
1KB
|
44 lines
5 poke53280,4:poke53281,4:print"[144][147]"
10 fori=1to7:reada$(i):next
15 s$="[144]":t$=""
20 fori=1to6:readb(i),c(i),d(i):next
100 a=int(6*rnd(1)+1):b=int(6*rnd(1)+1):c=int(6*rnd(1)+1):d=int(6*rnd(1)+1)
110 gosub900
130 print"";
140 ta=0:pe=0
150 ifa/2<>int(a/2)thenta=1:pe=a-1
160 ifb/2<>int(b/2)thenta=ta+1:pe=pe+b-1
170 ifc/2<>int(c/2)thenta=ta+1:pe=pe+c-1
180 ifd/2<>int(d/2)thenta=ta+1:pe=pe+d-1
185 ifte=1then300
190 print"[144]there ";:ifta=1thenprint"is 1 table."
200 ifta<>1thenprint"are"ta"tables."
210 print"there are"pe"people at the table";:ifta<>1thenprint"s";
220 print"."
230 print"hit any key, t to test theory, e to end"
240 geta$:ifa$=""then240
250 ifa$<>"t"anda$<>"e"then100
260 ifa$="t"thente=1:sc=0:goto100
270 goto63000
300 input"how many tables";t
310 input"how many people";p
320 ift<>taorp<>pethente=0:print"sorry, i don't think you have it!":goto190
330 print"very good!":sc=sc+1:ifsc=5thenprint"[147]i think you've solved it!"
331 goto63000
340 print"hit any key to continue"
350 geta$:ifa$=""then350
360 goto100
900 rem a, b, c, and d are numbers
905 print"[147]"
910 printt$;a$(1);a$(1);s$;a$(1);a$(1)
915 printt$;a$(b(a));a$(b(b));s$;a$(b(c));a$(b(d))
920 printt$;a$(c(a));a$(c(b));s$;a$(c(c));a$(c(d))
925 printt$;a$(d(a));a$(d(b));s$;a$(d(c));a$(d(d))
930 printt$;a$(7);a$(7);s$;a$(7);a$(7)
940 return
1000 data"[213][195][195][195][201] ","[194] [194] ","[194] [209] [194] ","[194][209] [209][194] ","[194][209] [194] ","[194] [209][194] ","[202][195][195][195][203] "
1010 data2,3,2,5,2,6,5,3,6,4,2,4,4,3,4,4,4,4
63000 print"[147]"
63005 print"load"chr$(34)"payload"chr$(34)",8":print"run"
63010 poke631,13:poke632,13:poke198,2:end